# print(bin(15))
# print(max('x','X','z'))
# print(ord('爱'))
# print(chr(29233))
# l=range(1,101)
# print(sum(range(1,101)))
# print(type(l))
#
# s1 = 'abc123456'
#
# print(s1[::2])
#
# print(s1.upper())
# print(s1.rjust(20,'~'))

import random
ALL_CHARS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

def yzm(codeLen=4):
    code=''

    for _ in range(codeLen):
        index=random.randrange(0,len(ALL_CHARS))
        code+=ALL_CHARS[index]
    return code
for _ in range(10):
    print(yzm(4))
import string
AllChar =string.digits+string.ascii_letters
def yzmnew(l=4):
    return ''.join(random.choices(AllChar,k=l))

for _ in range(10):
    print(yzmnew(5))


from os.path import splitext

def getSuffix(fileName):
    return splitext(fileName)[1][1:]

print(getSuffix('readme.txt'))       # txt
print(getSuffix('readme.txt.md'))    # md
print(getSuffix('.readme'))          #
print(getSuffix('readme.'))          #
print(getSuffix('readme')) 